<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>悦听</title>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <!--官网提供的 axios 在线地址-->
        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- 引入自己的js -->
<script src="index.js"></script>
<!-- 引入自己的css -->
<link rel="stylesheet" href="index.css">
 
</head>
<body>
    <div id="app">
        <!-- 播放主体区域 -->
        <div class="play_wrap">
            <!-- 搜索栏部分 -->
            <div class="search_bar">
                <img src="images/player_title.png" alt="">
                <input type="text" autocomplete="off" v-model="singer" @keyup.enter="searchMusic">
            </div>
            <!-- 中心模块 -->
            <div class="center_con">
                <!-- 搜索歌曲列表 -->
                <div class="song_wrap">
                    <ul class="song_list">
                        <li v-for="(item,index) in musicList">
                            <a href="#" @click="playMusic(item.id)"></a>
                            <p>{{item.name}}</p>
                            <span v-if="item.mvid!=0" @click="playMv(item.mvid)"><i></i></span>
                        </li>
                    </ul>
                    <img src="images/line.png" class="switch_btn" alt="">
                </div>
                <!-- 歌曲信息容器 -->
                <div class="player_con" :class="{playing:isPlaying}">
                    <img src="images/player_bar.png" class="play_bar">
                    <!-- 黑胶碟片 -->
                    <img src="images/disc.png" class="disc autoRotate">
                    <img :src="musicCover" class="cover autoRotate">
                </div>
                <!-- 评论容器 -->
                <div class="comment_wrap">
                    <h5 class="title">热门留言</h5>
                    <div class="comment_list">
                        <dl v-for="item in hotComments">
                            <dt>
                                <img :src="item.user.avatarUrl" alt="">
                            </dt>
                            <dd class="name">{{item.user.nickname}}</dd>
                            <dd class="detail">
                                {{item.content}}
                            </dd>
                        </dl>
                    </div>
                    <img src="images/line.png" class="right_line">
                </div>
            </div>
            <!-- 底部播放模块 -->
            <div class="audio_con">
                <audio ref="audio" @play="play" @pause="pause" :src="musicUrl" controls autoplay="autoplay" loop="loop" class="myaudio"></audio>
            </div>
            <!-- 视频播放模块 -->
            <div class="video_con" style="display: none;"  v-show="isShow">
                <video controls="controls" :src="mvUrl"></video>
                <div class="mask" @click="hide"></div>
            </div>
        </div>
    </div>
</body>
</html>